﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Se.Data
{
    /// <summary>
    /// SQL查询条件符号
    /// </summary>
    public enum DBFilterOperator : byte
    {
        None,
        /// <summary>
        /// 大于
        /// </summary>
        Bigger,
        /// <summary>
        /// 小于
        /// </summary>
        Smaller,
        /// <summary>
        /// 等于
        /// </summary>
        Equal,
        /// <summary>
        /// 大于等于
        /// </summary>
        BiggerAndEqual,
        /// <summary>
        /// 小于等于
        /// </summary>
        SmallerAndEqual,
    }

    /// <summary>
    /// SQL查询条件的数据类型
    /// </summary>
    public enum DBFilterType : byte
    {
        None,
        /// <summary>
        /// 日期
        /// </summary>
        DateTime,
        /// <summary>
        /// 字符串
        /// </summary>
        String,
        /// <summary>
        /// Int
        /// </summary>
        Int,
        /// <summary>
        /// Float
        /// </summary>
        Float,
    }

    /// <summary>
    /// 数据保存方式
    /// </summary>
    public enum DBSaveType : byte
    {
        None,

        Insert,

        Update,
    }

    /// <summary>
    /// 数据加载类型
    /// </summary>
    public enum DBLoadType : byte
    {
        None,
        /// <summary>
        /// 永久放在内存中
        /// </summary>
        MemoryAlways,
        /// <summary>
        /// 仅从数据库中加载
        /// </summary>
        DBOnly,
        /// <summary>
        /// 先从内存（服务器）再从数据库中加载
        /// </summary>
        MemoryThenDB,
    }

    /// <summary>
    /// 数据库类型
    /// </summary>
    public enum DataBaseType : byte
    {
        None,
        /// <summary>
        /// SQL Server
        /// </summary>
        SQLServer,
        /// <summary>
        /// MySQL
        /// </summary>
        MySQL,
    }


    /// <summary>
    /// 数据库列类型
    /// </summary>
    public enum ColumnDbType
    {
        /// <summary>
        /// Guid
        /// </summary>
        UniqueIdentifier = 0,
        /// <summary>
        /// Int
        /// </summary>
        Short,
        /// <summary>
        /// Int
        /// </summary>
        Int,
        /// <summary>
        /// Int
        /// </summary>
        Long,
        /// <summary>
        /// Varchar
        /// </summary>
        Varchar,
        /// <summary>
        /// DateTime
        /// </summary>
        DateTime,
        /// <summary>
        /// Text
        /// </summary>
        Text,
    }

    /// <summary>
    /// 
    /// </summary>
    public enum FieldModel
    {
        /// <summary>
        /// 
        /// </summary>
        Read = 1,
        /// <summary>
        /// 
        /// </summary>
        Write,
        /// <summary>
        /// 
        /// </summary>
        All
    }

}
